package architect;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import zipkin.server.internal.EnableZipkinServer;
import zipkin.server.internal.RegisterZipkinHealthIndicators;

import java.util.concurrent.TimeUnit;

/**
 * Zipkin链路跟踪服务启动类
 *
 * @author guanxin
 * @date 2018/4/24 16:17
 */

@EnableZipkinServer
@SpringBootApplication
public class ZipkinServerApp implements CommandLineRunner {

    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(ZipkinServerApp.class, args);
        TimeUnit.MINUTES.sleep(60);
        System.err.println("Zipkin Server=============>>>>>>>>>>>>>服务关闭");
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("Zipkin Server=============>>>>>>>>>>>>>启动完毕");
    }
}
